package com.boot.service.impl;

import com.boot.dao.PurchaseApplyDao;
import com.boot.dao.PurchaseRequestDao;
import com.boot.entity.*;
import com.boot.service.IPurchaseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class IPurchaseApplyServiceImpl implements IPurchaseApplyService {

    @Autowired
    private PurchaseApplyDao dao;

    @Override
    public List<Map<String, Object>> getPurchaseReleaseList(String purchapplyStatus, String documentNumber, String supplierName, Integer companyId) {
        return dao.getPurchaseReleaseList(purchapplyStatus, documentNumber, supplierName, companyId);
    }

    @Override
    public Integer getPurchaseReleaseCount(String purchapplyStatus, String documentNumber, String supplierName, Integer companyId) {
        return dao.getPurchaseReleaseList(purchapplyStatus, documentNumber, supplierName, companyId).size();
    }

    @Override
    public Map<String, Object> getPurchaseDetail(Integer tenderId) {
        return dao.getPurchaseDetail(tenderId);
    }

    @Override
    public Map<String, Object> getTenderDetail(Integer tenderId) {
        return dao.getTenderDetail(tenderId);
    }

    @Override
    public Map<String, Object> getPurchaseDetaiName(Integer tenderId) {
        return dao.getPurchaseDetaiName(tenderId);
    }

    @Override
    public Map<String, Object> getTenderDetailName(Integer tenderId) {
        return dao.getTenderDetailName(tenderId);
    }

    @Override
    public Map<String, Object> getTenderCreateInfo(Integer tenderId) {
        return dao.getTenderCreateInfo(tenderId);
    }

    @Override
    public List<Map<String, Object>> getTenderAuditList(Integer tenderId) {
        return dao.getTenderAuditList(tenderId);
    }

    @Override
    public Map<String, Object> getCoalQualityMap(Integer tenderId) {
        return dao.getCoalQualityMap(tenderId);
    }

    @Override
    public Boolean auditTender(TenderReview tenderReview) {
        return dao.auditTender(tenderReview);
    }

    @Override
    public Boolean updateTenderStatus(Integer tenderId, String checkOpinion, Long operationTime) {
        return dao.updateTenderStatus(tenderId,checkOpinion,operationTime);
    }

    @Override
    public List<Map<String, Object>> getTenderList(String purchapplyStatus, String documentNumber, String supplierName, Integer companyId) {
        return dao.getTenderList(purchapplyStatus, documentNumber, supplierName, companyId);
    }

    @Override
    public Integer getTenderListCount(String purchapplyStatus, String documentNumber, String supplierName, Integer companyId) {
        return dao.getTenderList(purchapplyStatus, documentNumber, supplierName, companyId).size();
    }
}